package com.example.dg.service.impl;

import com.example.dg.entity.Entity;
import com.example.dg.mapper.DgMapper;
import com.example.dg.service.DgServive;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DgServiceImpl implements DgServive {

    @Autowired
    DgMapper dgMapper;

    /**显示*/
    @Override
    public List<Entity> getAllDg(Entity entity) {
        return dgMapper.getAllDg(entity);
    }
    /**根据id来获取蛋糕信息*/
    @Override
    public Entity getDgById(String id) {
        return dgMapper.getDgById(id);
    }
    /**添加*/
    @Override
    public int Add(Entity entity) {
        return dgMapper.Add(entity);
    }


}
